<?php $s = Configure::read('Site'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $s['lang']?>" xml:lang="<?php echo $s['lang']?>">
	<head>
		<title><?php echo $title_for_layout; ?> / <?php echo $s['name']?></title>
		
		<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $s['charset']?>" />
		<meta name="author" content="<?php echo $s['author']?>" />
		<meta name="copyright" content="<?php echo $s['copyright']?>" />
		<meta name="description" content="<?php echo $s['description']?>" />
		<meta name="keywords" content="<?php echo $s['keywords']?>" />
		<meta name="generator" content="CakePHP" />

		<link href="favicon.ico" type="image/x-icon" rel="icon"/>
		<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
		<link href="<?php echo $s['rss_url']?>" type="application/rss+xml" rel="alternate" title="<?php echo $s['rss_title']?>"/>
		
		<?php echo $html->css('surdeig'); ?>
		
		<?php if(isset($javascript)):?>
		<?php echo $javascript->link('jquery'); ?>
		<?php endif;?>
		
		<?php echo $scripts_for_layout; ?>
		
</head>
<?php if($this->params['controller'] != "pages") {
	$body_id = $this->params['controller'];
} else {
	$body_id = $this->params['pass'][count($this->params['pass'])-1];
}?>

<body id="<?php echo $body_id; ?>">
	<cake:nocache>
	<?php if(isset($auth_user) and $auth_user['User']['is_admin']) echo $this->element('admin_menu', $auth_user); ?>
	<div id="userprofile">
		<?php if(isset($auth_user)):?>
		<?php //debug($auth_user);?>
		<?php echo $html->link(__('My profile', true), "/profiles/home", array('class'=>'first')); ?>
		<?php echo $html->link(__('Logout', true), $auth_user['User']['logout']); ?>
		<?php else: ?>
			<?php echo $html->link(__('Join today', true), "/authake/user/register", array('class'=>'first')); ?>
			<?php echo $html->link(__('Why?', true), "/profiles/"); ?>
			<?php echo $html->link(__('Login', true), "/authake/user/login"); ?>
		<?php endif; ?>
	</div>
	</cake:nocache>
	<div id="page_section">
		<div id="header_section">
			<div id="header">
				
				<h1 id="logo">
					<?php echo $html->link($s['name'], "/"); ?></h1>
			</div><!--End header-->
			<div id="nav_features" class="nav">
				<h4 class="information"><?php __("Begin with sourdough") ?></h4>
				<ul>
					<li class="starter"><?php echo $html->link(__('Sourdough starter', true), '/pages/guides/starter', array('title'=>__('How to make your first sourdough starter', true))); ?></li>
					<li class="grovt_brod"><?php echo $html->link(__('Full grain bread', true), '/pages/guides/grovt_brod', array('title'=>__('Bake a full grain sourdough bread', true))); ?></li>
					<li class="fint_brod"><?php echo $html->link(__('White bread', true), '/pages/guides/fint_brod', array('title'=>__('Bake a white sourdough bread', true))); ?></li>
				</ul>
			</div>
			<div id="nav" class="nav">
				<h4 class="information"><?php __("Learn about sourdough baking") ?></h4>
				<ul>
					<li class="articles"><?php echo $html->link(__('Articles', true), '/articles', array('title'=>__('Articles about sourdough baking', true))); ?></li>
					
					<li class="om_surdeig"><?php echo $html->link(__('About Surdeig.no', true), '/pages/om_surdeig', array('title'=>__('Information about this webpage', true))); ?></li>
					<li class="tips"><?php echo $html->link('Surdeig på twitter', 'http://twitter.com/surdeig'); ?></li>
				</ul>
			</div>
			
		</div><!--End extended_header-->
		<div id="content_section">
			<cake:nocache>
						
			<?php if ($session->check('Message.flash')): ?> 
				<div id="flash_wrapper">
				<div id="flash_wrapper_inner">
					<script type="text/javascript">
						//<![CDATA[
						jQuery(document).ready(function() {
							setTimeout(function() {
							        $("#flash_wrapper").fadeOut("slow")
							    }, 2000);
						});
						//]]>
				</script>
				<?php $session->flash(); ?> 
				</div>
				<div id="arrow"></div>
				</div>
			<?php endif; ?>
			
			</cake:nocache>
			<div id="content" class="content">
				<?php echo $content_for_layout; ?>
			</div><!-- End #content -->
		</div><!-- End #content_section -->

		<?php echo $this->element('ad_wide'); ?>

		<div id="footer">
			<p><?php echo $s['footer'] ?></p>
		</div><!-- End #footer -->
	</div><!-- End #page_section -->
<?php echo $s['footer_js'] ?>
<div id="ie6">
	<p><?php echo $s['ie6_message'] ?></p>
</div>
<a title="Real Time Web Analytics" href="http://getclicky.com/66383835"><img alt="Real Time Web Analytics" src="http://static.getclicky.com/media/links/badge.gif" border="0" /></a>
<script src="http://static.getclicky.com/js" type="text/javascript"></script>
<script type="text/javascript">try{ clicky.init(66383835); }catch(err){}</script>
<noscript><p><img alt="Clicky" width="1" height="1" src="http://in.getclicky.com/66383835ns.gif" /></p></noscript>

<?php echo $cakeDebug; ?>
</body>
</html>